package StudentSubjects;
import java.util.List;
public class Test {
	 public static void main(String[] args) {
	        Teacher teacher1 = new Teacher("刘老师",001,"女");
	        Teacher teacher2 = new Teacher("王老师",002,"男");

	        //刘老师添加 课程1和课程2
	        Course course1 = teacher1.addCourse(1,"python语言","A101","10:00");
	        Course course2 = teacher1.addCourse(2,"JAVA","A102","13:00");

	        //王老师添加 课程3
	        Course course3 = teacher2.addCourse(3,"C++","A101","19:00");

	        //学生1和学生2
	        Student student1 = new Student("小晨",20201001,"男");
	        Student student2 = new Student("小宋",20201002,"女");

	        //学生1选课 课程1和课程2
	        student1.selectCourse(course1);
	        student1.selectCourse(course2);

	        List<Course> courseList1 = student1.getCourseList();
	        System.out.println("学生2【选课】【课程1和课程2】课程信息:");
	        for (int i = 0; i < courseList1.size(); i++) {
	            System.out.println(courseList1.get(i).getClassname());
	        }

	        //学生1退课 课程1
	        student1.unSelectCourse(course1);
	        System.out.println("学生2【退课】【课程1】后课程信息:");
	        for (int i = 0; i < courseList1.size(); i++) {
	            System.out.println(courseList1.get(i).getClassname());
	        }
	    }
}
